package com.test.common;

public enum ResultCodeEnum {
    SUCCESS(200, "操作成功"),
    ADDITION_FAILED(401, "添加失败"),
    DELETION_FAILED(402, "删除失败"),
    UPDATE_FAILED(403, "更新失败"),
    NOT_FOUND(404, "未找到相关数据"),
    USERNAME_ERROR(501, "用户名错误"),
    PASSWORD_ERROR(503, "密码错误"),
    NOT_LOGIN(504, "未登录"),
    USERNAME_USED(505, "用户名已被使用"),
    UPDATE_USER_FAILED(506, "更新用户信息失败"),
    USERTYPE_ERROR(507, "用户类型错误"),
    SYSTEM_ERROR(500, "系统错误"),
    ;

    private Integer code;
    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
